import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView,
    meta:{
      keep:true
    }
  },
  {
    path: '/reg',
    name: 'reg',
    
    component: () => import( '../views/reg.vue'),
  },
  {
    path: '/publish',
    name: 'publish',
    
    component: () => import( '../views/publish.vue'),
    meta:{
      keep:true
    }
  },
  {
    path: '/user',
    name: 'user',
    
    component: () => import( '../views/userInfo/user.vue'),
    meta:{
      keep:true
    }
  },
  {
    path: '/login',
    name: 'login',
    
    component: () => import( '../views/login.vue')
  },
  {
    path: '/my',
    name: 'my',
    
    component: () => import( '../views/my.vue'),
    meta:{
      keep:true
    }
  },
  {
    path: '/search',
    name: 'search',
    
    component: () => import( '../views/search.vue'),
    
  },
  {
    path: '/changePassword',
    name: 'changePassword',
    
    component: () => import( '../views/changePassword.vue')
  },
  {
    path: '/detail',
    name: 'detail',
    
    component: () => import( '../views/detail/detail.vue')
  },
  {
    path: '/edit',
    name: 'edit',
    
    component: () => import( '../views/userInfo/edit.vue')
  },
  {
    path: '/gotPassword',
    name: 'gotPassword',
    
    component: () => import( '../views/forGetPassword.vue')
  },
  {
    path: '/getFavList',
    name: 'getFavList',
    
    component: () => import( '../views/getFavList.vue')
  },
  
  
  
]

const router = new VueRouter({
  routes
})

export default router
